package cn.like.stream.core;

import cn.hutool.extra.spring.SpringUtil;
import org.apache.rocketmq.spring.core.RocketMQTemplate;

/**
 * Description: rocket message base <br>
 *
 * @author <a href="mailto:likelovec@gmail.com">like</a>
 * @date 2021-07-18 22:25:44
 */
public interface Rocket {

    long SEND_TIME_OUT = 30 * 1000L;


    /**
     * topic
     *
     * @return {@link String}
     */
    String topic();

    /**
     * rocket mq template
     *
     * @return {@link RocketMQTemplate}
     */
    default RocketMQTemplate rocketMQTemplate() {
        return SpringUtil.getBean(RocketMQTemplate.class);
    }
}
